package br.cin.ufpe.in1118.middleware.distribution.services.util;

import java.net.Socket;

import br.cin.ufpe.in1118.middleware.distribution.services.ObjectReference;

public class MiddlewareUtil {

	public static boolean isON(ObjectReference objectReference) {
		
		try {
			Socket s = new Socket(objectReference.getHost(),objectReference.getPort());
			s.close();
			return true;
		} catch (Exception e) {
			return false;
		}
	}

}
